A REYES image rendering architecture is a system for computing computer animated video or images. The details of an exemplary REYES image rendering architecture are described in detail by Robert L. Cook, et al. in “The Reyes Image Rendering Architecture,” Computer Graphics, vol. 21, no. 4, Jul. 1987, which is incorporated herein by reference. When processed in conjunction with a REYES image rendering architecture compatible renderer (a “REYES renderer”), primitives represent objects that may be included in the computer animated video or images. These primitives are typically diced into polygonal meshes prior to being shaded and projected onto an image plane. After projecting the polygonal meshes onto the image plane, visible polygons are identified. More specifically, the polygons closest to defined elements of the image plane are identified. These elements may comprise infinitesimal points, lines, or areas on the image plane. Color values computed for vertices of the visible polygons are then used to compute color values for the image plane.
To ensure that a sufficient amount of primitive detail is included in the computer animated video or images, each polygon in the polygonal meshes is approximately equal in size to a pixel (e.g., the smallest distinct area of the image plane). Computer animated video or images are represented by an array of numbers. In the case of a two-dimensional image, the array of numbers is a two-dimensional array and each number in the array corresponds to a tiny portion of the image. Each element in the array is referred to as a picture element (or pixel); and the pixel ordinarily has the same location in the array as the portion of the image it represents. In the case of a gray scale image, the numerical value of each pixel represents the relative brightness (or intensity) of the portion of the image to which it corresponds. In the case of a color image, the numerical value of each pixel is a set of numbers (or a vector) representing the color of the portion of the image to which it corresponds. Several different systems are available for numerical representation of colors.
The amount of dicing applied to a primitive is, therefore, dependent upon the size of the primitive relative to a pixel. If the primitive is much larger, for example, a large amount of dicing may be required. Similarly, if the primitive is close in size to the pixel, a relatively small amount of dicing may be required.
Additionally, polygonal meshes produced by a REYES renderer are processed separately so that the REYES renderer need not maintain all of the polygonal meshes in memory or access more than just a subset of the polygonal meshes at any one time. Because of this aspect of a REYES renderer, color values computed for vertices do not typically incorporate global illumination. Persons skilled in the art recognize that global illumination includes accounting for the effects of other primitives in an object scene on a vertex being shaded (e.g., accounting for light reflected off of another primitive onto the vertex being shaded). Instead, a REYES renderer typically shades the vertices with texture maps and other non-global illumination techniques.
Prior art renderers that incorporate ray-tracing (“ray tracing renderers”) trace a first set of rays (e.g., “visibility rays”) from an imaginary camera or viewer's eye through a position (e.g., a pixel) on the image plane into an object scene. The positions at which the rays intersect the object scene are visible from the image plane. More specifically, a position intersected by a visibility ray is visible from the position on the image plane through which the ray is cast.
Shading the positions at which the rays intersect the object scene typically includes casting a set of rays (e.g., shading rays) from each of the intersection positions. Some or all of the shading rays may intersect other objects in the object scene. Color values computed at positions intersected by shading rays are then used to compute color values for the positions intersected by visibility rays. Ray tracing renderers, therefore, use global illumination to compute color values.
Ray tracing renderers may also dice primitives into polygonal meshes. But polygons included in such polygonal meshes may not include polygons approximately equal in size to a pixel. Instead, the size of the polygons is dependant upon, for example, the curvature of the object modeled by a corresponding primitive. Often times, therefore, polygonal meshes diced from a given primitive for a ray tracing renderer are much less complex than polygonal meshes diced from the same primitive by a REYES renderer. As the complexity of a polygonal mesh decreases, so does the amount of processing time required to determine whether a ray intersects the polygonal mesh.
In both REYES renderers and ray tracing renderers, the diffuse interreflection of light among objects in an object scene may be computed using techniques first described in detail by Gregory Ward et al. in “A Ray Tracing Solution for Diffuse Interreflection,” Computer Graphics, Vol. 22, No. 4, August 1988, which is hereby incorporated by reference. This last technique is expanded upon by Gregory Ward and Paul Heckbert in “Irradiance Gradients,” Eurographics Rendering Workshop, May, 1992, pp. 85-98, which is also hereby incorporated by reference. As described in more detail below, these techniques include either directly computing diffusely reflected light at a given position in an object scene or indirectly computing diffusely reflected light at a given position by reference to (e.g., averaging) diffusely reflected light directly computed at neighboring positions.
In the case of ray tracing renderers, the positions for which diffuse, indirect light is computed are typically selected by the visibility rays cast from the imaginary camera or viewer's eye through positions on the image plane. And in the case of REYES renderers, the positions for which diffuse, indirect light is computed are typically the vertices of the polygonal meshes created by the REYES renderers.
As described in more detail below, when applying techniques described in the two Gregory Ward publications listed above and other techniques for computing diffusely reflected light, these positions are simply processed by their order of selection (e.g., as visibility rays are cast into the object scene) or by their order of storage (e.g., a row by row in a polygonal mesh). So when indirectly computing diffusely reflected light at a given position, all of the other positions referenced during this computation typically precede the given position in terms of location. For example if this computation is executed for a vertex in a row of vertices on a grid of polygons, the other positions typically precede the vertex in the row.
As a result, when indirectly computing diffusely reflected light at a given position, a certain amount of extrapolation from one or more neighboring positions, which tend to be located in a common or similar direction from the given position, is required. In other words, these neighboring positions typically do not surround the given position. Because of this directional bias during the indirect computation of diffusely reflected light at the given position, increases or decreases in the rate of change of diffusely reflected light incident on a primitive may be missed. Similarly, diffusely reflected light at a given set of positions that is directly computed may be marked by relatively sharp and inaccurate variations from diffusely reflected light at neighboring positions that is indirectly computed before the diffusely reflected light at the given set of positions.
There is needed in the art, therefore, an improved technique for computing diffusely reflected light in an object scene. Specifically, a system and method for improved accounting of increases or decreases in the rate of change of diffusely reflected light.